<%@ page import="java.util.List, java.util.ArrayList, com.hotcars.model.Car" %>
<html>
<head><title>Hotcars - List</title></head>
<body>
	<h2>Cars List Page</h2>
	<% 
		List<Car> cars = (ArrayList) request.getAttribute("cars");
		for(int i = 0; i < cars.size(); i++) {
			Car c = cars.get(i);
			out.print("<a target = '_blank' href='car.html?id="+c.getId()+"'>"+ c.getYear() + " " + c.getMake() +  " " + c.getModel() + " $" + c.getPrice() +"</a> <br>");		
		}
	%>		
</body>
</html>
